﻿using System.Collections;

namespace VS2012_MSHA_Helper
{
    /// <summary>
    /// 解析出来的http://services.mtps.microsoft.com/ServiceAPI/catalogs/visualstudio11/zh-cn网页内容
    /// </summary>
    /// 

    class MshaBookGroups :CollectionBase
    {
        #region 私有字段声明

        #endregion

        #region 私有方法

        #endregion

        #region 构造函数

        #endregion

        #region 公共方法
        public void Add(MshaBookGroup group)
        {
            if (group != null)
                InnerList.Add(group);
        }

        public MshaBookGroup this[int index]
        {
            get
            {
                return (0 <= index) && (index < Count) ? InnerList[index] as MshaBookGroup : null;
            }
        }
        #endregion

        #region 属性

        #endregion

         
    }

    class MshaBookGroup : CollectionBase
    {
        #region 私有字段声明

        #endregion

        #region 私有方法

        #endregion

        #region 构造函数
        #endregion

        #region 公共方法
        public void Add (MshaBook book)
        {
            if (book != null)
                InnerList.Add(book);
        }
        #endregion

        #region 属性

        public string Id { get; set; }

        public string Name { get; set; }

        public string Vendor { get; set; }
        #endregion
    }

    class MshaBook : CollectionBase
    {
        #region 私有字段声明

        #endregion

        #region 私有方法

        #endregion

        #region 构造函数
        #endregion

        #region 公共方法
        public void Add(MshaPackage package)
        {
            if (package != null)
                InnerList.Add(package);
        }
        #endregion

        #region 属性
        public string Id { get; set; }

        public string Name { get; set; }

        public string Locale { get; set; }

        public string Description { get; set; }

        public string BrandingPackageName { get; set; }

        public object Tag { get; set; }
        #endregion
    }

    class MshaPackage
    {
        #region 私有字段声明

        #endregion

        #region 属性

        public string PackageType { get; set; }

        public string PackageFormat { get; set; }

        public string Name { get; set; }

        public string Deployed { get; set; }

        public string LastModified { get; set; }

        public string Etag { get; set; }

        public string CurrentLink { get; set; }

        public string PackageSize { get; set; }

        public string UncompressedSize { get; set; }

        public string ConstituentLink { get; set; }

        #endregion
    }
}
